package eventStrategies.physicalModel;

import model.IPhysicalDataModel;
import eventManager.AppEvent;
import eventStrategies.IEventResponse;
import events.ECodeEventList;
import events.physicalModel.RemoveCacheEvent;

public class RemoveCacheStrategy extends IEventResponse {

	private IPhysicalDataModel physModel;
	
	public RemoveCacheStrategy(IPhysicalDataModel physModel) {
		super(ECodeEventList.REMOVE_CACHE);		
		this.physModel = physModel;
	}

	@Override
	public void execute(AppEvent event) {
		RemoveCacheEvent fullEvent = (RemoveCacheEvent) event;
		physModel.removeCache(fullEvent.cache);
	}

}
